package com.awakening.o2o.util;

/**
 * @Author:这个程序员有纹身
 * @Date: Created in 16:51 2018\1\7 0007
 */
public class PageCalculator {

    /**
     * 控制层、Dao层的分页参数转换
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public static int calculateRowIndex(int pageIndex, int pageSize){
        return (pageIndex > 0)?(pageIndex - 1) * pageSize : 0;
    }

}
